package com.flong.spring;
import com.flong.spring.config.BeanLifeCycle;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Author:liangjl
 * @Date: 2020/6/8-22:22
 * @Eamil:jilongliang@sina.com
 */
public class IOCTest {


    @Test
    public void test1() {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(BeanLifeCycle.class);
        //System.out.println("容器创建");

        //关闭的时候才调用销毁方法
        applicationContext.close();

    }


}
